const SYSTEM_INFO = uni.getSystemInfoSync();
// 获取状态栏高度，H5赋0
const statusBarHeight = () => {
	return SYSTEM_INFO.statusBarHeight || 15
}
// 设置导航栏高度，H5赋80
const navBarHeight = () => {
	if (uni.getMenuButtonBoundingClientRect) {
		const MENU_BUTTON_INFO = uni.getMenuButtonBoundingClientRect();
		let {top,height} = MENU_BUTTON_INFO
		return (top - statusBarHeight()) * 2 + height
	} else {
		return 80
	}
}
// 适配抖音小程序左侧应用LOGO
const getLeftIcon = () => {
	// #ifdef MP-TOUTIAO
		let {leftIcon:{left,width}} = tt.getCustomButtonBoundingClientRect()
		return left + parseInt(width) + 5
	// #endif
	// #ifndef MP-TOUTIAO
		return 0
	// #endif
}
export {statusBarHeight,navBarHeight,getLeftIcon}